import { createRouter, createWebHistory, RouteRecordRaw } from 'vue-router'
import yao from '../router/yao'
import HomeView from '../page/HomeView.vue'
import { PMrouter } from './wwl/wwl'
import wl from './wl'
// 仓库
import { Boxrouter } from './cjj/cjj'
import statistical from '../router/zrp'

import LoginView from '../page/LoginView.vue'
const routes: Array<RouteRecordRaw> = [
  {
    path: '/',
    name: 'index',
    component: LoginView
  },
  {
    path: '/login',
    name: 'login',
    component: LoginView
  },
  {
    path: '/home',
    name: 'home',
    // meta: { title: '' },
    component: HomeView,
    children: [...PMrouter, ...wl, ...Boxrouter, ...statistical]
  }
]
const router = createRouter({
  history: createWebHistory(process.env.BASE_URL),
  routes
})

export default router
